// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

/*!
 * @file complex_nested_arrays.hpp
 * This header file contains the declaration of the described types in the IDL file.
 *
 * This file was generated by the tool fastddsgen.
 */

#ifndef FAST_DDS_GENERATED__COMPLEX_NESTED_ARRAYS_HPP
#define FAST_DDS_GENERATED__COMPLEX_NESTED_ARRAYS_HPP

#include <array>
#include <cstdint>
#include <string>
#include <utility>
#include <vector>

#include <fastcdr/cdr/fixed_size_string.hpp>

#if defined(_WIN32)
#if defined(EPROSIMA_USER_DLL_EXPORT)
#define eProsima_user_DllExport __declspec( dllexport )
#else
#define eProsima_user_DllExport
#endif  // EPROSIMA_USER_DLL_EXPORT
#else
#define eProsima_user_DllExport
#endif  // _WIN32

#if defined(_WIN32)
#if defined(EPROSIMA_USER_DLL_EXPORT)
#if defined(COMPLEX_NESTED_ARRAYS_SOURCE)
#define COMPLEX_NESTED_ARRAYS_DllAPI __declspec( dllexport )
#else
#define COMPLEX_NESTED_ARRAYS_DllAPI __declspec( dllimport )
#endif // COMPLEX_NESTED_ARRAYS_SOURCE
#else
#define COMPLEX_NESTED_ARRAYS_DllAPI
#endif  // EPROSIMA_USER_DLL_EXPORT
#else
#define COMPLEX_NESTED_ARRAYS_DllAPI
#endif // _WIN32

/*!
 * @brief This class represents the structure ThirdLevelElement defined by the user in the IDL file.
 * @ingroup complex_nested_arrays
 */
class ThirdLevelElement
{
public:

    /*!
     * @brief Default constructor.
     */
    eProsima_user_DllExport ThirdLevelElement()
    {
    }

    /*!
     * @brief Default destructor.
     */
    eProsima_user_DllExport ~ThirdLevelElement()
    {
    }

    /*!
     * @brief Copy constructor.
     * @param x Reference to the object ThirdLevelElement that will be copied.
     */
    eProsima_user_DllExport ThirdLevelElement(
            const ThirdLevelElement& x)
    {
                    m_x = x.m_x;

                    m_y = x.m_y;

    }

    /*!
     * @brief Move constructor.
     * @param x Reference to the object ThirdLevelElement that will be copied.
     */
    eProsima_user_DllExport ThirdLevelElement(
            ThirdLevelElement&& x) noexcept
    {
        m_x = x.m_x;
        m_y = x.m_y;
    }

    /*!
     * @brief Copy assignment.
     * @param x Reference to the object ThirdLevelElement that will be copied.
     */
    eProsima_user_DllExport ThirdLevelElement& operator =(
            const ThirdLevelElement& x)
    {

                    m_x = x.m_x;

                    m_y = x.m_y;

        return *this;
    }

    /*!
     * @brief Move assignment.
     * @param x Reference to the object ThirdLevelElement that will be copied.
     */
    eProsima_user_DllExport ThirdLevelElement& operator =(
            ThirdLevelElement&& x) noexcept
    {

        m_x = x.m_x;
        m_y = x.m_y;
        return *this;
    }

    /*!
     * @brief Comparison operator.
     * @param x ThirdLevelElement object to compare.
     */
    eProsima_user_DllExport bool operator ==(
            const ThirdLevelElement& x) const
    {
        return (m_x == x.m_x &&
           m_y == x.m_y);
    }

    /*!
     * @brief Comparison operator.
     * @param x ThirdLevelElement object to compare.
     */
    eProsima_user_DllExport bool operator !=(
            const ThirdLevelElement& x) const
    {
        return !(*this == x);
    }

    /*!
     * @brief This function sets a value in member x
     * @param _x New value for member x
     */
    eProsima_user_DllExport void x(
            double _x)
    {
        m_x = _x;
    }

    /*!
     * @brief This function returns the value of member x
     * @return Value of member x
     */
    eProsima_user_DllExport double x() const
    {
        return m_x;
    }

    /*!
     * @brief This function returns a reference to member x
     * @return Reference to member x
     */
    eProsima_user_DllExport double& x()
    {
        return m_x;
    }


    /*!
     * @brief This function sets a value in member y
     * @param _y New value for member y
     */
    eProsima_user_DllExport void y(
            double _y)
    {
        m_y = _y;
    }

    /*!
     * @brief This function returns the value of member y
     * @return Value of member y
     */
    eProsima_user_DllExport double y() const
    {
        return m_y;
    }

    /*!
     * @brief This function returns a reference to member y
     * @return Reference to member y
     */
    eProsima_user_DllExport double& y()
    {
        return m_y;
    }



private:

    double m_x{0.0};
    double m_y{0.0};

};
/*!
 * @brief This class represents the structure SecondLevelElement defined by the user in the IDL file.
 * @ingroup complex_nested_arrays
 */
class SecondLevelElement
{
public:

    /*!
     * @brief Default constructor.
     */
    eProsima_user_DllExport SecondLevelElement()
    {
    }

    /*!
     * @brief Default destructor.
     */
    eProsima_user_DllExport ~SecondLevelElement()
    {
    }

    /*!
     * @brief Copy constructor.
     * @param x Reference to the object SecondLevelElement that will be copied.
     */
    eProsima_user_DllExport SecondLevelElement(
            const SecondLevelElement& x)
    {
                    m_an_element_alone = x.m_an_element_alone;

                    m_a_limited_other_value = x.m_a_limited_other_value;

    }

    /*!
     * @brief Move constructor.
     * @param x Reference to the object SecondLevelElement that will be copied.
     */
    eProsima_user_DllExport SecondLevelElement(
            SecondLevelElement&& x) noexcept
    {
        m_an_element_alone = std::move(x.m_an_element_alone);
        m_a_limited_other_value = std::move(x.m_a_limited_other_value);
    }

    /*!
     * @brief Copy assignment.
     * @param x Reference to the object SecondLevelElement that will be copied.
     */
    eProsima_user_DllExport SecondLevelElement& operator =(
            const SecondLevelElement& x)
    {

                    m_an_element_alone = x.m_an_element_alone;

                    m_a_limited_other_value = x.m_a_limited_other_value;

        return *this;
    }

    /*!
     * @brief Move assignment.
     * @param x Reference to the object SecondLevelElement that will be copied.
     */
    eProsima_user_DllExport SecondLevelElement& operator =(
            SecondLevelElement&& x) noexcept
    {

        m_an_element_alone = std::move(x.m_an_element_alone);
        m_a_limited_other_value = std::move(x.m_a_limited_other_value);
        return *this;
    }

    /*!
     * @brief Comparison operator.
     * @param x SecondLevelElement object to compare.
     */
    eProsima_user_DllExport bool operator ==(
            const SecondLevelElement& x) const
    {
        return (m_an_element_alone == x.m_an_element_alone &&
           m_a_limited_other_value == x.m_a_limited_other_value);
    }

    /*!
     * @brief Comparison operator.
     * @param x SecondLevelElement object to compare.
     */
    eProsima_user_DllExport bool operator !=(
            const SecondLevelElement& x) const
    {
        return !(*this == x);
    }

    /*!
     * @brief This function copies the value in member an_element_alone
     * @param _an_element_alone New value to be copied in member an_element_alone
     */
    eProsima_user_DllExport void an_element_alone(
            const ThirdLevelElement& _an_element_alone)
    {
        m_an_element_alone = _an_element_alone;
    }

    /*!
     * @brief This function moves the value in member an_element_alone
     * @param _an_element_alone New value to be moved in member an_element_alone
     */
    eProsima_user_DllExport void an_element_alone(
            ThirdLevelElement&& _an_element_alone)
    {
        m_an_element_alone = std::move(_an_element_alone);
    }

    /*!
     * @brief This function returns a constant reference to member an_element_alone
     * @return Constant reference to member an_element_alone
     */
    eProsima_user_DllExport const ThirdLevelElement& an_element_alone() const
    {
        return m_an_element_alone;
    }

    /*!
     * @brief This function returns a reference to member an_element_alone
     * @return Reference to member an_element_alone
     */
    eProsima_user_DllExport ThirdLevelElement& an_element_alone()
    {
        return m_an_element_alone;
    }


    /*!
     * @brief This function copies the value in member a_limited_other_value
     * @param _a_limited_other_value New value to be copied in member a_limited_other_value
     */
    eProsima_user_DllExport void a_limited_other_value(
            const std::vector<ThirdLevelElement>& _a_limited_other_value)
    {
        m_a_limited_other_value = _a_limited_other_value;
    }

    /*!
     * @brief This function moves the value in member a_limited_other_value
     * @param _a_limited_other_value New value to be moved in member a_limited_other_value
     */
    eProsima_user_DllExport void a_limited_other_value(
            std::vector<ThirdLevelElement>&& _a_limited_other_value)
    {
        m_a_limited_other_value = std::move(_a_limited_other_value);
    }

    /*!
     * @brief This function returns a constant reference to member a_limited_other_value
     * @return Constant reference to member a_limited_other_value
     */
    eProsima_user_DllExport const std::vector<ThirdLevelElement>& a_limited_other_value() const
    {
        return m_a_limited_other_value;
    }

    /*!
     * @brief This function returns a reference to member a_limited_other_value
     * @return Reference to member a_limited_other_value
     */
    eProsima_user_DllExport std::vector<ThirdLevelElement>& a_limited_other_value()
    {
        return m_a_limited_other_value;
    }



private:

    ThirdLevelElement m_an_element_alone;
    std::vector<ThirdLevelElement> m_a_limited_other_value;

};
/*!
 * @brief This class represents the structure FirstLevelElement defined by the user in the IDL file.
 * @ingroup complex_nested_arrays
 */
class FirstLevelElement
{
public:

    /*!
     * @brief Default constructor.
     */
    eProsima_user_DllExport FirstLevelElement()
    {
    }

    /*!
     * @brief Default destructor.
     */
    eProsima_user_DllExport ~FirstLevelElement()
    {
    }

    /*!
     * @brief Copy constructor.
     * @param x Reference to the object FirstLevelElement that will be copied.
     */
    eProsima_user_DllExport FirstLevelElement(
            const FirstLevelElement& x)
    {
                    m_useless_name = x.m_useless_name;

                    m_sub = x.m_sub;

                    m_an_element_alone = x.m_an_element_alone;

    }

    /*!
     * @brief Move constructor.
     * @param x Reference to the object FirstLevelElement that will be copied.
     */
    eProsima_user_DllExport FirstLevelElement(
            FirstLevelElement&& x) noexcept
    {
        m_useless_name = std::move(x.m_useless_name);
        m_sub = std::move(x.m_sub);
        m_an_element_alone = std::move(x.m_an_element_alone);
    }

    /*!
     * @brief Copy assignment.
     * @param x Reference to the object FirstLevelElement that will be copied.
     */
    eProsima_user_DllExport FirstLevelElement& operator =(
            const FirstLevelElement& x)
    {

                    m_useless_name = x.m_useless_name;

                    m_sub = x.m_sub;

                    m_an_element_alone = x.m_an_element_alone;

        return *this;
    }

    /*!
     * @brief Move assignment.
     * @param x Reference to the object FirstLevelElement that will be copied.
     */
    eProsima_user_DllExport FirstLevelElement& operator =(
            FirstLevelElement&& x) noexcept
    {

        m_useless_name = std::move(x.m_useless_name);
        m_sub = std::move(x.m_sub);
        m_an_element_alone = std::move(x.m_an_element_alone);
        return *this;
    }

    /*!
     * @brief Comparison operator.
     * @param x FirstLevelElement object to compare.
     */
    eProsima_user_DllExport bool operator ==(
            const FirstLevelElement& x) const
    {
        return (m_useless_name == x.m_useless_name &&
           m_sub == x.m_sub &&
           m_an_element_alone == x.m_an_element_alone);
    }

    /*!
     * @brief Comparison operator.
     * @param x FirstLevelElement object to compare.
     */
    eProsima_user_DllExport bool operator !=(
            const FirstLevelElement& x) const
    {
        return !(*this == x);
    }

    /*!
     * @brief This function copies the value in member useless_name
     * @param _useless_name New value to be copied in member useless_name
     */
    eProsima_user_DllExport void useless_name(
            const std::string& _useless_name)
    {
        m_useless_name = _useless_name;
    }

    /*!
     * @brief This function moves the value in member useless_name
     * @param _useless_name New value to be moved in member useless_name
     */
    eProsima_user_DllExport void useless_name(
            std::string&& _useless_name)
    {
        m_useless_name = std::move(_useless_name);
    }

    /*!
     * @brief This function returns a constant reference to member useless_name
     * @return Constant reference to member useless_name
     */
    eProsima_user_DllExport const std::string& useless_name() const
    {
        return m_useless_name;
    }

    /*!
     * @brief This function returns a reference to member useless_name
     * @return Reference to member useless_name
     */
    eProsima_user_DllExport std::string& useless_name()
    {
        return m_useless_name;
    }


    /*!
     * @brief This function copies the value in member sub
     * @param _sub New value to be copied in member sub
     */
    eProsima_user_DllExport void sub(
            const std::vector<SecondLevelElement>& _sub)
    {
        m_sub = _sub;
    }

    /*!
     * @brief This function moves the value in member sub
     * @param _sub New value to be moved in member sub
     */
    eProsima_user_DllExport void sub(
            std::vector<SecondLevelElement>&& _sub)
    {
        m_sub = std::move(_sub);
    }

    /*!
     * @brief This function returns a constant reference to member sub
     * @return Constant reference to member sub
     */
    eProsima_user_DllExport const std::vector<SecondLevelElement>& sub() const
    {
        return m_sub;
    }

    /*!
     * @brief This function returns a reference to member sub
     * @return Reference to member sub
     */
    eProsima_user_DllExport std::vector<SecondLevelElement>& sub()
    {
        return m_sub;
    }


    /*!
     * @brief This function copies the value in member an_element_alone
     * @param _an_element_alone New value to be copied in member an_element_alone
     */
    eProsima_user_DllExport void an_element_alone(
            const ThirdLevelElement& _an_element_alone)
    {
        m_an_element_alone = _an_element_alone;
    }

    /*!
     * @brief This function moves the value in member an_element_alone
     * @param _an_element_alone New value to be moved in member an_element_alone
     */
    eProsima_user_DllExport void an_element_alone(
            ThirdLevelElement&& _an_element_alone)
    {
        m_an_element_alone = std::move(_an_element_alone);
    }

    /*!
     * @brief This function returns a constant reference to member an_element_alone
     * @return Constant reference to member an_element_alone
     */
    eProsima_user_DllExport const ThirdLevelElement& an_element_alone() const
    {
        return m_an_element_alone;
    }

    /*!
     * @brief This function returns a reference to member an_element_alone
     * @return Reference to member an_element_alone
     */
    eProsima_user_DllExport ThirdLevelElement& an_element_alone()
    {
        return m_an_element_alone;
    }



private:

    std::string m_useless_name;
    std::vector<SecondLevelElement> m_sub;
    ThirdLevelElement m_an_element_alone;

};
/*!
 * @brief This class represents the structure complex_nested_arrays defined by the user in the IDL file.
 * @ingroup complex_nested_arrays
 */
class complex_nested_arrays
{
public:

    /*!
     * @brief Default constructor.
     */
    eProsima_user_DllExport complex_nested_arrays()
    {
    }

    /*!
     * @brief Default destructor.
     */
    eProsima_user_DllExport ~complex_nested_arrays()
    {
    }

    /*!
     * @brief Copy constructor.
     * @param x Reference to the object complex_nested_arrays that will be copied.
     */
    eProsima_user_DllExport complex_nested_arrays(
            const complex_nested_arrays& x)
    {
                    m_array_of_elements = x.m_array_of_elements;

    }

    /*!
     * @brief Move constructor.
     * @param x Reference to the object complex_nested_arrays that will be copied.
     */
    eProsima_user_DllExport complex_nested_arrays(
            complex_nested_arrays&& x) noexcept
    {
        m_array_of_elements = std::move(x.m_array_of_elements);
    }

    /*!
     * @brief Copy assignment.
     * @param x Reference to the object complex_nested_arrays that will be copied.
     */
    eProsima_user_DllExport complex_nested_arrays& operator =(
            const complex_nested_arrays& x)
    {

                    m_array_of_elements = x.m_array_of_elements;

        return *this;
    }

    /*!
     * @brief Move assignment.
     * @param x Reference to the object complex_nested_arrays that will be copied.
     */
    eProsima_user_DllExport complex_nested_arrays& operator =(
            complex_nested_arrays&& x) noexcept
    {

        m_array_of_elements = std::move(x.m_array_of_elements);
        return *this;
    }

    /*!
     * @brief Comparison operator.
     * @param x complex_nested_arrays object to compare.
     */
    eProsima_user_DllExport bool operator ==(
            const complex_nested_arrays& x) const
    {
        return (m_array_of_elements == x.m_array_of_elements);
    }

    /*!
     * @brief Comparison operator.
     * @param x complex_nested_arrays object to compare.
     */
    eProsima_user_DllExport bool operator !=(
            const complex_nested_arrays& x) const
    {
        return !(*this == x);
    }

    /*!
     * @brief This function copies the value in member array_of_elements
     * @param _array_of_elements New value to be copied in member array_of_elements
     */
    eProsima_user_DllExport void array_of_elements(
            const std::array<FirstLevelElement, 3>& _array_of_elements)
    {
        m_array_of_elements = _array_of_elements;
    }

    /*!
     * @brief This function moves the value in member array_of_elements
     * @param _array_of_elements New value to be moved in member array_of_elements
     */
    eProsima_user_DllExport void array_of_elements(
            std::array<FirstLevelElement, 3>&& _array_of_elements)
    {
        m_array_of_elements = std::move(_array_of_elements);
    }

    /*!
     * @brief This function returns a constant reference to member array_of_elements
     * @return Constant reference to member array_of_elements
     */
    eProsima_user_DllExport const std::array<FirstLevelElement, 3>& array_of_elements() const
    {
        return m_array_of_elements;
    }

    /*!
     * @brief This function returns a reference to member array_of_elements
     * @return Reference to member array_of_elements
     */
    eProsima_user_DllExport std::array<FirstLevelElement, 3>& array_of_elements()
    {
        return m_array_of_elements;
    }



private:

    std::array<FirstLevelElement, 3> m_array_of_elements;

};

#endif // _FAST_DDS_GENERATED_COMPLEX_NESTED_ARRAYS_HPP_


